/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package ged.impl;

import ged.Color;
import ged.ConnectionShapes;
import ged.Font;
import ged.GedPackage;
import ged.LineEndDecoration;
import ged.Label_attributes;
import ged.LineSourceDecoration;
import ged.LineTargetDecoration;
import ged.LineDecoration;
import ged.LineType;
import ged.LineWidth;
import ged.Link;
import ged.Node;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Link</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link ged.impl.LinkImpl#getLabel <em>Label</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getLineShape <em>Line Shape</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getSourceDecoration <em>Source Decoration</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getTargetDecoration <em>Target Decoration</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getSourceLabel <em>Source Label</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getTargetLabel <em>Target Label</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getConnection_lineType <em>Connection line Type</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getLine_target_decoration <em>Line target decoration</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getLine_source_decoration <em>Line source decoration</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getShape_of_connection <em>Shape of connection</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getConn_linewidth <em>Conn linewidth</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getFont_color <em>Font color</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getFont <em>Font</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getSource <em>Source</em>}</li>
 *   <li>{@link ged.impl.LinkImpl#getTarget <em>Target</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class LinkImpl extends EObjectImpl implements Link
{
  /**
   * The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLabel()
   * @generated
   * @ordered
   */
  protected static final String LABEL_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLabel()
   * @generated
   * @ordered
   */
  protected String label = LABEL_EDEFAULT;

  /**
   * The default value of the '{@link #getLineShape() <em>Line Shape</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLineShape()
   * @generated
   * @ordered
   */
  protected static final String LINE_SHAPE_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getLineShape() <em>Line Shape</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLineShape()
   * @generated
   * @ordered
   */
  protected String lineShape = LINE_SHAPE_EDEFAULT;

  /**
   * The default value of the '{@link #getSourceDecoration() <em>Source Decoration</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getSourceDecoration()
   * @generated
   * @ordered
   */
  protected static final String SOURCE_DECORATION_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getSourceDecoration() <em>Source Decoration</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getSourceDecoration()
   * @generated
   * @ordered
   */
  protected String sourceDecoration = SOURCE_DECORATION_EDEFAULT;

  /**
   * The default value of the '{@link #getTargetDecoration() <em>Target Decoration</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getTargetDecoration()
   * @generated
   * @ordered
   */
  protected static final String TARGET_DECORATION_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getTargetDecoration() <em>Target Decoration</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getTargetDecoration()
   * @generated
   * @ordered
   */
  protected String targetDecoration = TARGET_DECORATION_EDEFAULT;

  /**
   * The default value of the '{@link #getSourceLabel() <em>Source Label</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getSourceLabel()
   * @generated
   * @ordered
   */
  protected static final String SOURCE_LABEL_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getSourceLabel() <em>Source Label</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getSourceLabel()
   * @generated
   * @ordered
   */
  protected String sourceLabel = SOURCE_LABEL_EDEFAULT;

  /**
   * The default value of the '{@link #getTargetLabel() <em>Target Label</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getTargetLabel()
   * @generated
   * @ordered
   */
  protected static final String TARGET_LABEL_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getTargetLabel() <em>Target Label</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getTargetLabel()
   * @generated
   * @ordered
   */
  protected String targetLabel = TARGET_LABEL_EDEFAULT;

  /**
   * The default value of the '{@link #getConnection_lineType() <em>Connection line Type</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getConnection_lineType()
   * @generated
   * @ordered
   */
  protected static final LineType CONNECTION_LINE_TYPE_EDEFAULT = LineType.SOLID;

  /**
   * The cached value of the '{@link #getConnection_lineType() <em>Connection line Type</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getConnection_lineType()
   * @generated
   * @ordered
   */
  protected LineType connection_lineType = CONNECTION_LINE_TYPE_EDEFAULT;

  /**
   * The default value of the '{@link #getLine_target_decoration() <em>Line target decoration</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLine_target_decoration()
   * @generated
   * @ordered
   */
  protected static final LineEndDecoration LINE_TARGET_DECORATION_EDEFAULT = LineEndDecoration.NONE;

  /**
   * The cached value of the '{@link #getLine_target_decoration() <em>Line target decoration</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLine_target_decoration()
   * @generated
   * @ordered
   */
  protected LineEndDecoration line_target_decoration = LINE_TARGET_DECORATION_EDEFAULT;

  /**
   * The default value of the '{@link #getLine_source_decoration() <em>Line source decoration</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLine_source_decoration()
   * @generated
   * @ordered
   */
  protected static final LineEndDecoration LINE_SOURCE_DECORATION_EDEFAULT = LineEndDecoration.NONE;

  /**
   * The cached value of the '{@link #getLine_source_decoration() <em>Line source decoration</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLine_source_decoration()
   * @generated
   * @ordered
   */
  protected LineEndDecoration line_source_decoration = LINE_SOURCE_DECORATION_EDEFAULT;

  /**
   * The default value of the '{@link #getShape_of_connection() <em>Shape of connection</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getShape_of_connection()
   * @generated
   * @ordered
   */
  protected static final ConnectionShapes SHAPE_OF_CONNECTION_EDEFAULT = ConnectionShapes.POLYLINE_CONNECTION_EX;

  /**
   * The cached value of the '{@link #getShape_of_connection() <em>Shape of connection</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getShape_of_connection()
   * @generated
   * @ordered
   */
  protected ConnectionShapes shape_of_connection = SHAPE_OF_CONNECTION_EDEFAULT;

  /**
   * The cached value of the '{@link #getConn_linewidth() <em>Conn linewidth</em>}' reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getConn_linewidth()
   * @generated
   * @ordered
   */
  protected LineWidth conn_linewidth;

  /**
   * The cached value of the '{@link #getFont_color() <em>Font color</em>}' reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getFont_color()
   * @generated
   * @ordered
   */
  protected Color font_color;

  /**
   * The cached value of the '{@link #getFont() <em>Font</em>}' reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getFont()
   * @generated
   * @ordered
   */
  protected Font font;

  /**
   * The cached value of the '{@link #getSource() <em>Source</em>}' reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getSource()
   * @generated
   * @ordered
   */
  protected Node source;

  /**
   * The cached value of the '{@link #getTarget() <em>Target</em>}' reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getTarget()
   * @generated
   * @ordered
   */
  protected Node target;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected LinkImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return GedPackage.Literals.LINK;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getLabel()
  {
    return label;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setLabel(String newLabel)
  {
    String oldLabel = label;
    label = newLabel;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__LABEL, oldLabel, label));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getLineShape()
  {
    return lineShape;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setLineShape(String newLineShape)
  {
    String oldLineShape = lineShape;
    lineShape = newLineShape;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__LINE_SHAPE, oldLineShape, lineShape));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getSourceDecoration()
  {
    return sourceDecoration;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setSourceDecoration(String newSourceDecoration)
  {
    String oldSourceDecoration = sourceDecoration;
    sourceDecoration = newSourceDecoration;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__SOURCE_DECORATION, oldSourceDecoration, sourceDecoration));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getTargetDecoration()
  {
    return targetDecoration;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setTargetDecoration(String newTargetDecoration)
  {
    String oldTargetDecoration = targetDecoration;
    targetDecoration = newTargetDecoration;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__TARGET_DECORATION, oldTargetDecoration, targetDecoration));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getSourceLabel()
  {
    return sourceLabel;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setSourceLabel(String newSourceLabel)
  {
    String oldSourceLabel = sourceLabel;
    sourceLabel = newSourceLabel;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__SOURCE_LABEL, oldSourceLabel, sourceLabel));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getTargetLabel()
  {
    return targetLabel;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setTargetLabel(String newTargetLabel)
  {
    String oldTargetLabel = targetLabel;
    targetLabel = newTargetLabel;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__TARGET_LABEL, oldTargetLabel, targetLabel));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public LineType getConnection_lineType()
  {
    return connection_lineType;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setConnection_lineType(LineType newConnection_lineType)
  {
    LineType oldConnection_lineType = connection_lineType;
    connection_lineType = newConnection_lineType == null ? CONNECTION_LINE_TYPE_EDEFAULT : newConnection_lineType;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__CONNECTION_LINE_TYPE, oldConnection_lineType, connection_lineType));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public LineEndDecoration getLine_target_decoration()
  {
    return line_target_decoration;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setLine_target_decoration(LineEndDecoration newLine_target_decoration)
  {
    LineEndDecoration oldLine_target_decoration = line_target_decoration;
    line_target_decoration = newLine_target_decoration == null ? LINE_TARGET_DECORATION_EDEFAULT : newLine_target_decoration;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__LINE_TARGET_DECORATION, oldLine_target_decoration, line_target_decoration));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public LineEndDecoration getLine_source_decoration()
  {
    return line_source_decoration;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setLine_source_decoration(LineEndDecoration newLine_source_decoration)
  {
    LineEndDecoration oldLine_source_decoration = line_source_decoration;
    line_source_decoration = newLine_source_decoration == null ? LINE_SOURCE_DECORATION_EDEFAULT : newLine_source_decoration;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__LINE_SOURCE_DECORATION, oldLine_source_decoration, line_source_decoration));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public ConnectionShapes getShape_of_connection()
  {
    return shape_of_connection;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setShape_of_connection(ConnectionShapes newShape_of_connection)
  {
    ConnectionShapes oldShape_of_connection = shape_of_connection;
    shape_of_connection = newShape_of_connection == null ? SHAPE_OF_CONNECTION_EDEFAULT : newShape_of_connection;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__SHAPE_OF_CONNECTION, oldShape_of_connection, shape_of_connection));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public LineWidth getConn_linewidth()
  {
    if (conn_linewidth != null && conn_linewidth.eIsProxy())
    {
      InternalEObject oldConn_linewidth = (InternalEObject)conn_linewidth;
      conn_linewidth = (LineWidth)eResolveProxy(oldConn_linewidth);
      if (conn_linewidth != oldConn_linewidth)
      {
        if (eNotificationRequired())
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, GedPackage.LINK__CONN_LINEWIDTH, oldConn_linewidth, conn_linewidth));
      }
    }
    return conn_linewidth;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public LineWidth basicGetConn_linewidth()
  {
    return conn_linewidth;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setConn_linewidth(LineWidth newConn_linewidth)
  {
    LineWidth oldConn_linewidth = conn_linewidth;
    conn_linewidth = newConn_linewidth;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__CONN_LINEWIDTH, oldConn_linewidth, conn_linewidth));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Color getFont_color()
  {
    if (font_color != null && font_color.eIsProxy())
    {
      InternalEObject oldFont_color = (InternalEObject)font_color;
      font_color = (Color)eResolveProxy(oldFont_color);
      if (font_color != oldFont_color)
      {
        if (eNotificationRequired())
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, GedPackage.LINK__FONT_COLOR, oldFont_color, font_color));
      }
    }
    return font_color;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Color basicGetFont_color()
  {
    return font_color;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setFont_color(Color newFont_color)
  {
    Color oldFont_color = font_color;
    font_color = newFont_color;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__FONT_COLOR, oldFont_color, font_color));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Font getFont()
  {
    if (font != null && font.eIsProxy())
    {
      InternalEObject oldFont = (InternalEObject)font;
      font = (Font)eResolveProxy(oldFont);
      if (font != oldFont)
      {
        if (eNotificationRequired())
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, GedPackage.LINK__FONT, oldFont, font));
      }
    }
    return font;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Font basicGetFont()
  {
    return font;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setFont(Font newFont)
  {
    Font oldFont = font;
    font = newFont;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__FONT, oldFont, font));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Node getSource()
  {
    if (source != null && source.eIsProxy())
    {
      InternalEObject oldSource = (InternalEObject)source;
      source = (Node)eResolveProxy(oldSource);
      if (source != oldSource)
      {
        if (eNotificationRequired())
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, GedPackage.LINK__SOURCE, oldSource, source));
      }
    }
    return source;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Node basicGetSource()
  {
    return source;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setSource(Node newSource)
  {
    Node oldSource = source;
    source = newSource;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__SOURCE, oldSource, source));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Node getTarget()
  {
    if (target != null && target.eIsProxy())
    {
      InternalEObject oldTarget = (InternalEObject)target;
      target = (Node)eResolveProxy(oldTarget);
      if (target != oldTarget)
      {
        if (eNotificationRequired())
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, GedPackage.LINK__TARGET, oldTarget, target));
      }
    }
    return target;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Node basicGetTarget()
  {
    return target;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setTarget(Node newTarget)
  {
    Node oldTarget = target;
    target = newTarget;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINK__TARGET, oldTarget, target));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case GedPackage.LINK__LABEL:
        return getLabel();
      case GedPackage.LINK__LINE_SHAPE:
        return getLineShape();
      case GedPackage.LINK__SOURCE_DECORATION:
        return getSourceDecoration();
      case GedPackage.LINK__TARGET_DECORATION:
        return getTargetDecoration();
      case GedPackage.LINK__SOURCE_LABEL:
        return getSourceLabel();
      case GedPackage.LINK__TARGET_LABEL:
        return getTargetLabel();
      case GedPackage.LINK__CONNECTION_LINE_TYPE:
        return getConnection_lineType();
      case GedPackage.LINK__LINE_TARGET_DECORATION:
        return getLine_target_decoration();
      case GedPackage.LINK__LINE_SOURCE_DECORATION:
        return getLine_source_decoration();
      case GedPackage.LINK__SHAPE_OF_CONNECTION:
        return getShape_of_connection();
      case GedPackage.LINK__CONN_LINEWIDTH:
        if (resolve) return getConn_linewidth();
        return basicGetConn_linewidth();
      case GedPackage.LINK__FONT_COLOR:
        if (resolve) return getFont_color();
        return basicGetFont_color();
      case GedPackage.LINK__FONT:
        if (resolve) return getFont();
        return basicGetFont();
      case GedPackage.LINK__SOURCE:
        if (resolve) return getSource();
        return basicGetSource();
      case GedPackage.LINK__TARGET:
        if (resolve) return getTarget();
        return basicGetTarget();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case GedPackage.LINK__LABEL:
        setLabel((String)newValue);
        return;
      case GedPackage.LINK__LINE_SHAPE:
        setLineShape((String)newValue);
        return;
      case GedPackage.LINK__SOURCE_DECORATION:
        setSourceDecoration((String)newValue);
        return;
      case GedPackage.LINK__TARGET_DECORATION:
        setTargetDecoration((String)newValue);
        return;
      case GedPackage.LINK__SOURCE_LABEL:
        setSourceLabel((String)newValue);
        return;
      case GedPackage.LINK__TARGET_LABEL:
        setTargetLabel((String)newValue);
        return;
      case GedPackage.LINK__CONNECTION_LINE_TYPE:
        setConnection_lineType((LineType)newValue);
        return;
      case GedPackage.LINK__LINE_TARGET_DECORATION:
        setLine_target_decoration((LineEndDecoration)newValue);
        return;
      case GedPackage.LINK__LINE_SOURCE_DECORATION:
        setLine_source_decoration((LineEndDecoration)newValue);
        return;
      case GedPackage.LINK__SHAPE_OF_CONNECTION:
        setShape_of_connection((ConnectionShapes)newValue);
        return;
      case GedPackage.LINK__CONN_LINEWIDTH:
        setConn_linewidth((LineWidth)newValue);
        return;
      case GedPackage.LINK__FONT_COLOR:
        setFont_color((Color)newValue);
        return;
      case GedPackage.LINK__FONT:
        setFont((Font)newValue);
        return;
      case GedPackage.LINK__SOURCE:
        setSource((Node)newValue);
        return;
      case GedPackage.LINK__TARGET:
        setTarget((Node)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case GedPackage.LINK__LABEL:
        setLabel(LABEL_EDEFAULT);
        return;
      case GedPackage.LINK__LINE_SHAPE:
        setLineShape(LINE_SHAPE_EDEFAULT);
        return;
      case GedPackage.LINK__SOURCE_DECORATION:
        setSourceDecoration(SOURCE_DECORATION_EDEFAULT);
        return;
      case GedPackage.LINK__TARGET_DECORATION:
        setTargetDecoration(TARGET_DECORATION_EDEFAULT);
        return;
      case GedPackage.LINK__SOURCE_LABEL:
        setSourceLabel(SOURCE_LABEL_EDEFAULT);
        return;
      case GedPackage.LINK__TARGET_LABEL:
        setTargetLabel(TARGET_LABEL_EDEFAULT);
        return;
      case GedPackage.LINK__CONNECTION_LINE_TYPE:
        setConnection_lineType(CONNECTION_LINE_TYPE_EDEFAULT);
        return;
      case GedPackage.LINK__LINE_TARGET_DECORATION:
        setLine_target_decoration(LINE_TARGET_DECORATION_EDEFAULT);
        return;
      case GedPackage.LINK__LINE_SOURCE_DECORATION:
        setLine_source_decoration(LINE_SOURCE_DECORATION_EDEFAULT);
        return;
      case GedPackage.LINK__SHAPE_OF_CONNECTION:
        setShape_of_connection(SHAPE_OF_CONNECTION_EDEFAULT);
        return;
      case GedPackage.LINK__CONN_LINEWIDTH:
        setConn_linewidth((LineWidth)null);
        return;
      case GedPackage.LINK__FONT_COLOR:
        setFont_color((Color)null);
        return;
      case GedPackage.LINK__FONT:
        setFont((Font)null);
        return;
      case GedPackage.LINK__SOURCE:
        setSource((Node)null);
        return;
      case GedPackage.LINK__TARGET:
        setTarget((Node)null);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case GedPackage.LINK__LABEL:
        return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
      case GedPackage.LINK__LINE_SHAPE:
        return LINE_SHAPE_EDEFAULT == null ? lineShape != null : !LINE_SHAPE_EDEFAULT.equals(lineShape);
      case GedPackage.LINK__SOURCE_DECORATION:
        return SOURCE_DECORATION_EDEFAULT == null ? sourceDecoration != null : !SOURCE_DECORATION_EDEFAULT.equals(sourceDecoration);
      case GedPackage.LINK__TARGET_DECORATION:
        return TARGET_DECORATION_EDEFAULT == null ? targetDecoration != null : !TARGET_DECORATION_EDEFAULT.equals(targetDecoration);
      case GedPackage.LINK__SOURCE_LABEL:
        return SOURCE_LABEL_EDEFAULT == null ? sourceLabel != null : !SOURCE_LABEL_EDEFAULT.equals(sourceLabel);
      case GedPackage.LINK__TARGET_LABEL:
        return TARGET_LABEL_EDEFAULT == null ? targetLabel != null : !TARGET_LABEL_EDEFAULT.equals(targetLabel);
      case GedPackage.LINK__CONNECTION_LINE_TYPE:
        return connection_lineType != CONNECTION_LINE_TYPE_EDEFAULT;
      case GedPackage.LINK__LINE_TARGET_DECORATION:
        return line_target_decoration != LINE_TARGET_DECORATION_EDEFAULT;
      case GedPackage.LINK__LINE_SOURCE_DECORATION:
        return line_source_decoration != LINE_SOURCE_DECORATION_EDEFAULT;
      case GedPackage.LINK__SHAPE_OF_CONNECTION:
        return shape_of_connection != SHAPE_OF_CONNECTION_EDEFAULT;
      case GedPackage.LINK__CONN_LINEWIDTH:
        return conn_linewidth != null;
      case GedPackage.LINK__FONT_COLOR:
        return font_color != null;
      case GedPackage.LINK__FONT:
        return font != null;
      case GedPackage.LINK__SOURCE:
        return source != null;
      case GedPackage.LINK__TARGET:
        return target != null;
    }
    return super.eIsSet(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String toString()
  {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (label: ");
    result.append(label);
    result.append(", lineShape: ");
    result.append(lineShape);
    result.append(", sourceDecoration: ");
    result.append(sourceDecoration);
    result.append(", targetDecoration: ");
    result.append(targetDecoration);
    result.append(", sourceLabel: ");
    result.append(sourceLabel);
    result.append(", targetLabel: ");
    result.append(targetLabel);
    result.append(", connection_lineType: ");
    result.append(connection_lineType);
    result.append(", line_target_decoration: ");
    result.append(line_target_decoration);
    result.append(", line_source_decoration: ");
    result.append(line_source_decoration);
    result.append(", shape_of_connection: ");
    result.append(shape_of_connection);
    result.append(')');
    return result.toString();
  }

} //LinkImpl
